﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>
    <?php
		require_once("../connectMysql/connetMysql.class.php");
		$db=new connetMysql;
		$con=$db->getConnect();
		include 'chk.php';
		$tid=$_POST['newsid'];
		$tifacc=$_POST['ifacc'];
		$shconnect=$_POST['sheheyijian'];
		date_default_timezone_set('PRC');
        $curtime=date("Y-m-d h:i:s");
        
		if($tifacc=='1')
		{
			$sql = "UPDATE newsdraft SET newsstate=1,newscheckview='".$shconnect. "',newschecktime='".$curtime."' WHERE newsid=".$tid; 
			mysqli_query($con,$sql);
			echo "<script>alert('审核通过，返回待审核页面');</script>";
			
		}
		else
		{
			$sql = "UPDATE newsdraft SET newsstate=2,newscheckview='".$shconnect. "',newschecktime='".$curtime."' WHERE newsid=".$tid; 
			
			mysqli_query($con,$sql);
			echo "<script>alert('审核不通过，返回待审核页面');</script>";
			
		}
		echo "<script>window.location.href='index.php'</script>";
		$db->clossConnet();
	?>
<body>
</body>
</html>